package com.monitor.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.monitor.entity.ErpMaterielFlow;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 物料流转表 Mapper 接口
 * </p>
 *
 * @author LX
 * @since 2018-09-08
 */
public interface ErpMaterielFlowMapper extends BaseMapper<ErpMaterielFlow> {
	@Select("select mf.id from erp_materiel_flow mf where mf.materiel_flow_date>= #{stratTime} and mf.materiel_flow_date< #{endTime} and mf.materiel_flow_sheet_id like '%RK%'  and mf.warehouse_name in ( select cw.war_name from erp_customer_warehouse cw where cw.customer_id= #{custId})")
	public  List<Map<String,Object>> selectByCustId(@Param("stratTime")String stratTime, @Param("endTime")String endTime, @Param("custId")Integer custId);
}
